package com.cgd.appointment.service.impl;

import com.cgd.appointment.entity.Users;
import com.cgd.appointment.mapper.UsersDao;
import com.cgd.appointment.service.IUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsersService implements IUsersService {
    @Autowired
    private UsersDao usersDao;

    @Override
    public Users findlogin(String username) {
        return usersDao.findlogin(username);
    }
    @Override
    public void addusers(String username,String password) {
        usersDao.addusers(username,password);
    }
    @Override
    public List<Users> listusers() { return usersDao.listusers(); }
    @Override
    public void addmess(String mobile,String username,String wechat,int loginid) {
        usersDao.addmess(mobile,username,wechat,loginid);
    }
    @Override
    public Users findbyloginid(int loginid) {
        return usersDao.findbyloginid(loginid);
    }
    @Override
    public void addadmins(Users users) { usersDao.addadmins(users); }
    @Override
    public void deleteuser(String username) { usersDao.deleteuser(username);}
    //修改密码
    @Override
    public void updatepassword(String username,String password) { usersDao.updatepassword(username,password); }
}
